import request from "@/utils/request";

export default {
  batchInsert(selectedId, testNum) {
    return request({
      url: `/selfTest/batchInsert/${selectedId}/${testNum}`,
      method: "get",
    });
  },
  batchGet(data) {
    return request({
      url: `/selfTest/batchGet/${data}`,
      method: "get",
    });
  },
  submit(score, seconds, questionItemId, name, allAnswers, ids) {
    const data = { score, seconds, questionItemId, name, allAnswers, ids };
    return request({
      url: `/selfTest/submit`,
      method: "post",
      data,
    });
  },
  geBySelfTestId(selfTestId) {
    return request({
      url: `/selfTest/geBySelfTestId/${selfTestId}`,
      method: "get",
    });
  },
  deleteById(selfTestId) {
    return request({
      url: `/selfTest/deleteById/${selfTestId}`,
      method: "delete",
    });
  }
};
